<?php

namespace App\Models\Dream\Video;

use Illuminate\Database\Eloquent\Model;
use App\Models\Dream\Video\Comment;
use DateTimeInterface;

class Branch extends Model
{
    //
    protected $table = 'dream_video_branchs';



    //视频对应的评论
    public function branchComments()
    {
        return $this->hasMany('App\Models\Dream\Video\Comment','video_id');
    }


    protected function serializeDate(DateTimeInterface $date)
    {
        return $date->format($this->dateFormat ?: 'Y-m-d H:i:s');
    }
}
